/*
** list.h for 42sh in /home/demesy_j/svn/quarante-deuxsh/trunk
**
** Made by julien demesy
** Login   <demesy_j@epitech.net>
**
** Started on  Mon Mar 12 11:10:08 2012 julien demesy
** Last update Mon Mar 12 11:39:34 2012 julien demesy
*/

#ifndef		LIST_H_
# define	LIST_H_

typedef	struct	s_list
{
  char		*data;
  struct s_list	*next;
  struct s_list	*prev;
}	t_list;

t_list          *create_list();
t_list		*create_env_list(char **env);
void            empty_list(t_list *list);
void            delete_list(t_list **list);

void            add_before(t_list *element, char *val);
void            add_after(t_list *element, char *val);
void            add_begin(t_list *root, char *val);
void            add_end(t_list *root, char *val);

void            delete_elem(t_list *element);
void            delete_first(t_list *root);
void            delete_last(t_list *root);

#endif		/* LIST_H_ */
